package com.practice.book.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-25
 * Time: 15:18
 */
@Slf4j
@RequestMapping("/test")
@RestController
public class TestController {
    @RequestMapping("/t1")
    public String t1() {
        int a = 1;
        log.info("执行t1...");
        return "数据" + a;
    }

    @RequestMapping("/t2")
    public int t2() {
        String s = "s";
        log.info("执行t2...");
        return s.length();
    }


    @RequestMapping("/t3")
    public int t3() {
        int[] a = {1};
        int val = a[3];
        log.info("执行t3...");
        return val;
    }
}
